home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / cnet / quickdl.lha / QuickDL.rexx < prev    next >
OS/2 REXX Batch file  |  1995-10-27  |  7KB  |  199 lines

  1.  
  2. /*
  3.  
  4. Shows a list of commonly needed files that callers can mark (or DL)
  5. just by typing "QuickDL" from any prompt.
  6.  
  7. >        Quick-DL of Commonly Used Files
  8. >
  9. > [A] CNet-BBS Demo (disk 1 of 2)
  10. > [B] CNet-BBS Demo (disk 2 of 2)
  11. > [C] CNet-BBS HELP files
  12. > [D] Commonly asked questions about this BBS
  13. > [E] Info on compressing/uncompress files
  14. > [F] List of all files U/Led during 1995
  15. > [G] Rules of this BBS
  16. > [H] External 14k4 v.32 Fax/Modems $99
  17. > [I] External 28k8 V.Fast/v.34 Fax/Modems $159
  18. > [J] Latest Virus-Checker by John Veldthuis
  19. > [K] Frequently asked questions about the Amiga
  20. > [L] 101 questions to ask a BBS author BEFORE you buy his software
  21. > [M] May'94 AmigaWorld Magazine review of CNet-BBS v3.05c
  22. > [N] June 1994 questionnaire regarding new update for Arexx.  Mail this in!!!
  23. >     Select:
  24.  
  25. Or users type certain cmds and D/L certain files:
  26. "HELP" will get them your BBS-help-files.
  27. "APP"  will get them your BBS-application file.
  28. "DEMO" will get them the CNet demo-disks.  <***** Add this one to your BBS ****
  29.  
  30. Installation:
  31. 1) Copy QuickDL.rexx TO pfiles:QuickDL.rexx
  32.  
  33. 2) Add the following lines onto the END of the CNet:BBSmenu list
  34.    marked as "2; Available everywhere:"
  35.    DLHelp  | {#0 pfiles:QuickDL.rexx  CNet3:CNetHelp.lha}
  36.    DEMo    | {#0 pfiles:QuickDL.rexx "CNet3:CNet305c_d1.DMS CNet3:CNet305c_d2.DMS"}
  37.    QUICkdl | {#0 pfiles:QuickDL.rexx}
  38.  
  39. 3) Edit the lines below marked "user-editable variables".
  40.    Enter your own choices for:
  41.       "Filenames"    (Which files will the users be able to QuickDL?)
  42.       "Descriptions" (What will the descriptions in the menu be?)
  43.  
  44. If QuickDL.rexx is passed a parameters (in double-quotes), users will
  45. only be allowed to DL those files.  (See DLHelp cmd.)
  46.  
  47. If QuickDL.rexx is NOT passed a parameter, users will be shown a menu
  48. list of choices. (See QuickDL cmd.)
  49.  
  50. $VER: QuickDL.rexx v1.5 Fri 27-Oct-95 08:23:06
  51.    Updated menu.
  52.    Checked for compatibility with CNet v3.05c.
  53.    Released into Aminet ftp.wustl.edu comm/cnet dir.
  54.  
  55. $VER: QuickDL.rexx v1.4 Sun 01-May-94 16:33:15
  56.    Added 'ChangeWhere' string.
  57.  
  58. $VER: QuickDL.rexx v1.3 Mon 07-Feb-94 17:17:58
  59.    Added "DEMO" cmd info and example.
  60.    Can now pass more than 1 file via BBSmenu.  (Must be in double-quotes.)
  61.  
  62. $VER: QuickDL.rexx v1.2 Mon 24-Jan-94 01:12:44
  63.    Added choice "[H] Frequently asked questions about the Amiga"
  64.    Added choice "[A] CNet-BBS Demo (disk #1 of 2)"
  65.    Added choice "[B] CNet-BBS Demo (disk #2 of 2)"
  66.  
  67. $VER: QuickDL.rexx v1.1 Sat 25-Dec-93 20:05:03
  68.    Added choice "[G] Virus-Checker by John Veldthuis"
  69.  
  70. $VER: QuickDL.rexx v1.0 Thu 02-Dec-93 10:52:26
  71.    Written/tested with CNet v2.94beta
  72.  
  73. Author Info:
  74.    Bill Beogelein (ag775@detroit.freenet.org)
  75.    Box 530441
  76.    Livonia, MI 48153
  77.    BBS 810-473-2020, 28k8, Fido 1:2410/207
  78.  
  79. Future Plans:
  80.    Write to DLs to dloads log.
  81.    Please report all bugs, and make suggestions for new features.
  82.  
  83. Ignore:
  84.    lz u CNet3:QuickDL.LHA pfiles:rexx/QuickDL.rexx R:QuickDL.readme a:zzzBBSad Help:BB_CMDS
  85.    Copy CNet3:QuickDL.LHA UP:
  86.  
  87. ********************** End of docs *******************************/
  88.  
  89. /***************** Top of user-editable variables **************************/
  90. /*   Full path/filename         Description as shown to the caller   */
  91.  
  92. f.1 ="CNet3:CNet305c_d1.DMS       CNet-BBS Demo (disk 1 of 2)"
  93. f.2 ="CNet3:CNet305c_d2.DMS       CNet-BBS Demo (disk 2 of 2)"
  94. f.3 ="CNet3:CNetHelp.lha          CNet-BBS HELP files"
  95. f.4 ="UDBase3:1.1/CommQuest.lha   Commonly asked questions about this BBS"
  96. f.5 ="UDBase6:6.3/ARCHIVRS.PAK    Info on compressing/uncompress files"
  97. f.6 ="UDBase3:1.1/files1995.lha   List of all files U/Led during 1995"
  98. f.7 ="UDBase3:1.1/SWHQbul.lzh     Rules of this BBS"
  99. f.8 ="UDBase3:7.2/LineLink.lha    External 14k4 v.32 Fax/Modems $99"
  100. f.9 ="UDBase3:7.2/SupraSysOp2.lha External 28k8 V.Fast/v.34 Fax/Modems $159"
  101. f.10="UDBase5:21.18/Vchk718.lha   Latest Virus-Checker by John Veldthuis"
  102. f.11="UDBase5:9.2/AmyFAQ.lha      Frequently asked questions about the Amiga"
  103. f.12="UDBase3:1.1/BBSQues.LHA     101 questions to ask a BBS author BEFORE you buy his software"
  104. f.13="UDBase3:7.3/CNetArt.lha     May'94 AmigaWorld Magazine review of CNet-BBS v3.05c"
  105. f.14="UDBase3:13.6/ArexxQ.lha     June 1994 questionnaire regarding new update for Arexx.  Mail this in!!!"
  106. f.15=""
  107. f.16=""
  108. f.17=""
  109. f.18=""
  110. f.19=""
  111. f.20=""                            /* NULL string must mark end of list */
  112. /******************* End of user-editable variables *************************/
  113.  
  114. LF='0a'x
  115. QU='22'x
  116.  
  117. options results
  118. parse arg fnames
  119.  
  120. 'ChangeWhere' "QuickDL.rexx"
  121. if(fnames~="") then      /* Passed filename, use it */
  122. do
  123.    desc=""
  124.    'transmit' ""
  125.    call NowOrLater()
  126.    exit
  127. end
  128.  
  129. do i=1 to 26                     /* Count (and check for) all filenames */
  130.    w=subword(f.i, 1, 1)
  131.    if(w="") then leave
  132.    if(~exists(w)) then
  133.    do
  134.       str=" *** Pfiles:QuickDL.rexx can't find" w
  135.       'transmit' LF str
  136.       'logEntry' str
  137.    end
  138. end
  139. count=i-1
  140.  
  141. do forever                    /* NOT passed filename, show menu */
  142.    'transmit' LF LF "    Quick-DL of Commonly Used Files" LF
  143.    do i=1 to count
  144.       w=subword(f.i, 2)             /* Display menu */
  145.       'transmit' " [" || d2c(i+64) || "]" w
  146.    end
  147.  
  148.    'sendString' LF || " Selection: "
  149.    'getChar'
  150.    ans=RESULT
  151.  
  152.    if(ans<'A' | ans>'Z') then
  153.    do
  154.       'transmit' "n2 Returning to the BBS.  (Download selected files with the DS cmd.)n1"
  155.       exit
  156.    end
  157.  
  158.    'sendString' " [" || ans || "]"
  159.    ans=c2d(ans)-64
  160.    if(ans>count) then      /* User pick is out of range */
  161.    do
  162.       'transmit' "n2 *** Choice not available.n1"
  163.       iterate
  164.    end
  165.  
  166.    fnames=subword(f.ans, 1, 1)
  167.    desc  =subword(f.ans, 2)
  168.    call NowOrLater()
  169. end
  170. exit        /****** End of main ******/
  171.  
  172. NowOrLater:
  173.    fnamecount = words(fnames)
  174.    if(fnamecount>1) then 'transmit' " There are" fnamecount "files in this set."
  175.    do i=1 to fnamecount
  176.       each.i=word(fnames, i)
  177.       if(each.i="") then return
  178.       'transmit' "n2" QU || each.i || QU desc
  179.       'sendString' " [D]ownload now, [S]elect for later download: "
  180.       'getChar'
  181.       ans=RESULT
  182.       if(ans='D') then           /* D/L now, or later? */
  183.       do
  184.          'logEntry' "Pfiles:QuickDL.rexx used to DL" each.i
  185.          'transmit' " Download now"
  186.          'SetProtocol' ""
  187.          'XDN' each.i
  188.       end
  189.       if(ans='S') then
  190.       do
  191.          'logEntry' "Pfiles:QuickDL.rexx used to DL" each.i
  192.          'transmit' " Selected n2 (Selected files can be downloaded later with the DS cmd.)"
  193.          'selectFile' each.i
  194.       end
  195.    end
  196. return
  197.  
  198. /*** EOF QuickDL.rexx 810-473-2020 ***/
  199.